﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TodoApp.ResultModel;
using Volo.Abp.Application.Services;

namespace TodoApp.TMS_personnelmatters.Positions
{
    public class TMS_PositiveService: ApplicationService
    {
        public readonly ITMS_PositiveRepository _tMS_PositiveRepository;
        public TMS_PositiveService(ITMS_PositiveRepository tMS_PositiveRepository)
        {
            _tMS_PositiveRepository = tMS_PositiveRepository;
        }
        /// <summary>
        /// 显示分页
        /// </summary>
        /// <param name="name"></param>
        /// <param name="department"></param>
        /// <param name="position"></param>
        /// <param name="date"></param>
        /// <param name="dates"></param>
        /// <param name="state"></param>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public async Task<PageResponse<TMS_PositiveDto>> GetPositive(string name, string department, string position, string date, string dates, int? state, int pageindex, int pagesize)
        {
            return await _tMS_PositiveRepository.GetPositive(name, department, position, date, dates, state, pageindex, pagesize);
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<int> DeletePositive(string id)
        {
            return await _tMS_PositiveRepository.DeletePositive(id);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="tMS_Induction"></param>
        /// <returns></returns>
        public async Task<int> UpdatePositive(TMS_Positive tMS_Positive)
        {
            return await _tMS_PositiveRepository.UpdatePositive(tMS_Positive);
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="tMS_Induction"></param>
        /// <returns></returns>
        public async Task<int> CreatePositive(TMS_Positive tMS_Positive)
        {
            return await _tMS_PositiveRepository.CreatePositive(tMS_Positive);
        }
        /// <summary>
        /// 提交
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<int> UpdateState(string id)
        {
            return await _tMS_PositiveRepository.UpdateState(id);
        }
    }
}
